package mapper

import "com.yy.api/server/models"

type UserMapper interface {
	GenericMapper[models.UserBasic]
	UpdateByUserId(user *models.UserBasic) error
}

type UserMapperImpl struct {
	*GenericMapperImpl[models.UserBasic]
}

func (m *UserMapperImpl) UpdateByUserId(user *models.UserBasic) error {
	return m.DB.Model(user).Where("user_id = ?", user.UserId).Updates(user).Error
}
